﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
using CPGM;

namespace CPGM_ReceiverTest
{
    public partial class frmSender : Form
    {
        public frmSender()
        {
            InitializeComponent();
        }

        private void btnConnect_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            try
            {
                CPGMSender s = new CPGM.CPGMSender();
                s.Connect(txtMulticastGroup.Text, txtPortNumber.Text, txtTTL.Text,"662");

                s.SplitFile(@"d:\temp\small.txt");
                //s.Disconnect();
            }
            catch (System.Exception ex) { MessageBox.Show(ex.Message); }
            this.Cursor = Cursors.Default;
        }

        private void frmSender_Load(object sender, EventArgs e)
        {

        }
    }
}
